from enum import Enum


class ResultCodeEnum(Enum):
    @property
    def code(self):
        return self.value[0]

    @property
    def msg(self):
        return self.value[1]


class SingletonMeta(type):
    def __init__(cls, *args, **kwargs):
        cls.__instance = None
        super().__init__(*args, **kwargs)

    def __call__(cls, *args, **kwargs):
        if cls.__instance is None:
            cls.__instance = super().__call__(*args, **kwargs)
        return cls.__instance

